<?php
if($_GET){
    $u=$_GET["username"];
    $p=$_GET["password"];

    //连接数据库
    $con=mysql_connect("localhost","root","1234");
    mysql_query("set names utf8");
    mysql_select_db("sql");
    $sql="select * from userinfo where user='$u' and pwd='$p'";
    $r=mysql_query($sql,$con);
    $rows=mysql_fetch_array($r);
      if($rows['user'])
    {
include('2.html');
return($u);
    }else
    {
 include('1.html');
    }
  
}

?>